import { mock, ok } from '@/utils/requestMock';

// 树
mock('*', '/GIS/GISDetectionPointTree', () => ([
  {
    inspection_area_name: '嫦娥三号巡视区',
    inspection_area_id: 1,
    detection_point_list: [
      { detection_point_num: '探测点001', detection_point_id: 1, data_set_list: [
        { data_set_name: 'LPR 2B', data_set_id: 1 },
        { data_set_name: 'PIXS 2B', data_set_id: 2 },
        { data_set_name: 'APXS 2B', data_set_id: 3 }
      ] },
    ]
  }
]));

// 巡视区列表
mock('*', '/GIS/GISDetectionPointInspectionArea', (config) => ({
  count: 2,
  list: [
    { id: 1, inspection_area_name: '嫦娥三号巡视区', task: 'CE3', create_time: '2025-01-15 10:30:00', left_latitude: 70, left_longitude: -180, right_latitude: -7, right_longitude: 180, base_image_path: '/images/ce3_base.tif' },
    { id: 2, inspection_area_name: '嫦娥四号巡视区', task: 'CE4', create_time: '2025-01-16 14:20:00', left_latitude: 65, left_longitude: -175, right_latitude: -5, right_longitude: 175, base_image_path: '/images/ce4_base.tif' }
  ],
  page: 1,
  pages: 1,
  page_size: 20
}));

// 探测点列表
mock('GET', '/GIS/GISDetectionPoint', (config) => ({
  count: 3,
  list: [
    { id: 1, inspection_area_id: 1, create_time: '2025-01-15 10:30:00', update_time: '2025-01-15 10:30:00', detection_strat_time: '2025-01-15 10:30:00', detection_end_time: '2025-01-15 11:30:00', planet_id: 1, detection_name: '探测点001', detection_num: '001', latitude: 45.5, longitude: 120.3, is_special: 0 },
    { id: 2, inspection_area_id: 1, create_time: '2025-01-15 11:30:00', update_time: '2025-01-15 11:30:00', detection_strat_time: '2025-01-15 11:30:00', detection_end_time: '2025-01-15 12:30:00', planet_id: 1, detection_name: '探测点002', detection_num: '002', latitude: 46.2, longitude: 121.1, is_special: 1 },
    { id: 3, inspection_area_id: 1, create_time: '2025-01-15 12:30:00', update_time: '2025-01-15 12:30:00', detection_strat_time: '2025-01-15 12:30:00', detection_end_time: '2025-01-15 13:30:00', planet_id: 1, detection_name: '探测点003', detection_num: '003', latitude: 47.8, longitude: 122.5, is_special: 0 }
  ],
  page: 1,
  pages: 1,
  page_size: 20
}));

// 数据集列表
mock('*', '/GIS/GISDetectionPointDataSet', (config) => ({
  count: 2,
  list: [
    { id: 1, inspection_area_id: 1, detection_point_id: 1, create_time: '2025-01-15 10:30:00', update_time: '2025-01-15 10:30:00', planet_id: 1, data_set_name: 'LPR 2B', file_count: 12, file_sizes: 256.8 },
    { id: 2, inspection_area_id: 1, detection_point_id: 1, create_time: '2025-01-15 10:35:00', update_time: '2025-01-15 10:35:00', planet_id: 1, data_set_name: 'PIXS 2B', file_count: 10, file_sizes: 189.3 }
  ],
  page: 1,
  pages: 1,
  page_size: 20
}));

// 各类POST
mock('POST', '/GIS/GISDetectionPoint', () => ok());
mock('POST', '/GIS/GISDetectionPointInspectionArea', () => ok());
mock('POST', '/GIS/GISDetectionPointDataSet', () => ok());


